package com.myth.process;

public class TestThread1 extends Thread{
    public void run(){
        for(int i = 0;i < 500;i++){
            System.out.println("子线程"+i+":"+Thread.currentThread().getName());
        }
    }
    public static void main(String[] args) {

        TestThread1 tt1 = new TestThread1();
        TestThread1 tt2 = new TestThread1();
        tt1.start();
        tt2.start();
/*        Thread t1 = new Thread(tt);
        Thread t2 = new Thread(tt);

        t1.start();
        t2.start();*/

        for(int i = 0;i < 200;i++){
            System.out.println("主线程哦"+i+":"+Thread.currentThread().getName());
        }

    }

}
